package pl.niemar22.unitests;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class LoginPage extends Page {

   public LoginPage(WebDriver driver) {
       super(driver);
   }
       
   public HomePage login(String login, String password) {
       System.out.println("Sprawdzaj czy sie loguje");
       insertText(By.id("login"), login);
       insertText(By.id("password"), password);
       click(By.name("commit"));
       
       return new HomePage(driver);
       
   }
   

}
